package com.kt.delivery.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Bean
    public UserLoginInterceptor userLoginInterceptor(){
        return new UserLoginInterceptor();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(userLoginInterceptor()).addPathPatterns("/api/**").excludePathPatterns("/api/delicery/login",
                "/api/order/getMoney","/api/ocr/ocrFile","/api/order/notifyUrl","/api/order/notifyUrlJm");
    }
}
